set fileformat=unix
syntax on
filetype indent on
filetype plugin on

set nu
set nocompatible
set backspace=indent,eol,start
set ic
set autoindent
set cindent
set ruler
set showcmd
set incsearch  "set is
set hlsearch
set tabstop=4
set shiftwidth=4

if has("gui_running")
"	set guifont=Terminus\ 13
	"set guifont=Liberation\ Mono\ 10
	"colorscheme blacksea
	colorscheme torte
"	set guifont=inconsolata\ 11
"	set guifont=ubuntu\ 11
	" Remove menu bar
	"set guioptions-=m
	"hi Comment gui=italic guifg=LightBlue
    set guifont=YaHei\ Consolas\ Hybrid\ 14
	hi Comment gui=italic guifg=#45462D
	hi Search guifg=Blue
	hi Normal guibg=Black guifg=White
	" Remove toolbar
	set guioptions-=T
endif

au FileType c,cpp setlocal cinoptions=:0,g0,(0,w1 shiftwidth=4 tabstop=4
set textwidth=100
set listchars=tab:>-,trail:~
highlight def link Trail Todo

set colorcolumn=100
let g:NeoComplCache_DisableAutoComplete=1
"let g:SupperTabDefaultCompletionType='<C-X><C-U>'

"set syntax=cpp.doxygen

"au BufEnter /home/heefan/cvsworking/tws_vendor/qt/QtEmbedded-4.5.3-armsolo/include/ setlocal tags+=/home/heefan/cvsworking/tws_vendor/qt/QtEmbedded-4.5.3-armsolo/include/tags
"au BufEnter /home/heefan/cvsworking/xpcscale/include/ setlocal tags+=/home/heefan/cvsworking/xpcscale/include/tags
"au BufEnter /home/heefan/cvsworking/tws_modules++/include/ setlocal tags+=/home/heefan/cvsworking/tws_modules++/include/tags
"au BufEnter /home/heefan/cvsworking/tws_modules++/src/modules/ setlocal tags+=/home/heefan/cvsworking/tws_modules++/src/modules/tags
au BufEnter /home/heefan/cvsworking/xpcscale/src/programs/infomatdisplay/maindisplay/* setlocal tags+=/home/heefan/cvsworking/xpcscale/src/programs/infomatdisplay/maindisplay/tags
"au BufEnter /home/heefan/cvsworking/tws_modules++/src/modules/ setlocal tags+=/home/heefan/cvsworking/tws_modules++/src/modules/tags

set cscopequickfix=s-,c-,d-,i-,t-,e-
cs add /home/heefan/cvsworking/xpcscale/src/programs/infomatdisplay/maindisplay/cscope.out /home/heefan/cvsworking/xpcscale/src/programs/infomatdisplay/maindisplay
cs add /home/heefan/cvsworking/xpcscale/inclue/cscope.out  /home/heefan/cvsworking/xpcscale/inclue/
cs add /home/heefan/cvsworking/tws_modules++/src/modules/cscope.out /home/heefan/cvsworking/tws_modules++/src/modules/
"map cscope

"autocmd BufRead,BufNewFile *.vb setlocal filetype=vbnet 
set foldmethod=marker
" set foldmethod=indent

"taglist
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1

"winManager
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap wm :WMToggle<cr>
"au BufWinLeave * mkview
"au BufWinEnter * silent loadview
"
"autocmd BufNewFile,BufRead *.p? compiler perl
"autocmd BufNewFile,BufRead *.p? map <F2> :Perldoc<cword><CR>
"autocmd BufNewFile,BufRead *.p? setf perl
"autocmd BufNewFile,BufRead *.p? let g:perldoc_program='/usr/bin/perldoc'
"autocmd BufNewFile,BufRead *.p? source /home/heefan/.vim/ftplugin/perl_doc.vim

"TAB替换为空格：
set ts=4
set expandtab
%retab!
"
"空格替换为TAB：
":set ts=4
":set noexpandtab
":%retab!
"
highlight OverLength ctermbg=red ctermfg=white guibg=#592929

hi CursorLine   cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white

hi Folded guibg=black guifg=grey40 ctermfg=grey ctermbg=darkgrey
hi FoldColumn guibg=black guifg=grey20 ctermfg=4 ctermbg=7

"set status line
set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%]
set laststatus=2
set ruler
